/**
 * 
 */
package bot;

import specialtriggers.FavArtistTrigger;
import specialtriggers.FavTrackTrigger;
import specialtriggers.HyllaDinNationTrigger;
import specialtriggers.HyllaDinSannaNationTrigger;
import specialtriggers.HyllaWombosNationTrigger;
import specialtriggers.NewTriggerTrigger;
import specialtriggers.NowPlayingTrigger;
import specialtriggers.ReloadTriggersTrigger;
import specialtriggers.UptimeTrigger;
import specialtriggers.VersionTrigger;
import trigger.*;

/**
 * @author Philip
 * 
 */
public class TriggerLoader extends FileLoader {
	private TriggerFactory triggerFactory;

	public TriggerLoader(String fileName) {
		super(fileName);
		triggerFactory = new TriggerFactory();
	}

	@Override
	public void load(IRCBot ircBot) {
		while (scan.hasNextLine()) {
			Trigger t = triggerFactory.createTrigger(scan.nextLine());
			if (t != null) {
				ircBot.addTrigger(t);
			}
		}
		scan.close();
		
	}
}
